package com.sharemarking.application.common.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.sharemarking.application.common.BaseEntity;

@Entity
@Table(name="sys_menu")
public class Menu extends BaseEntity {
	public static final int PERMISSION_READ=1;
	public static final int PERMISSION_CREATE=2;
	public static final int PERMISSION_WRITE=4;
	public static final int PERMISSION_DELETE=8;
	@Column(nullable=false)
	private Integer parentId;//父级菜单id
	private String path;//菜单id路径,以逗号隔开
	@Column(nullable=false)
	private String name;//菜单名称
	private Integer sort;//排序
	private String href;//链接
	private String target;//打开链接目标，默认mainFrame
	private String icon;//只有顶级菜单需要图标
	@Column(nullable=false)
	private String symbol;//权限标识
	@Column(nullable=false)
	private Integer permission;//需要验证的权限，如0b111,其中第1位（从右算起）代表读权限，第2位代表添加权限，第3位代表修改,第4位代表删除
	
	public Integer getParentId() {
		return parentId;
	}
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getSort() {
		return sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	public String getHref() {
		return href;
	}
	public void setHref(String href) {
		this.href = href;
	}
	public String getTarget() {
		return target;
	}
	public void setTarget(String target) {
		this.target = target;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getSymbol() {
		return symbol;
	}
	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}
	public Integer getPermission() {
		return permission;
	}
	public void setPermission(Integer permission) {
		this.permission = permission;
	}
}
